using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Sys_UserAndDiseaseMap : EntityTypeConfiguration<Sys_UserAndDisease>
    {
        public Sys_UserAndDiseaseMap()
        {
            // Primary Key
            this.HasKey(t => t.UserAndDiseaseID);

            // Properties
            this.Property(t => t.UserNikeName)
                .HasMaxLength(50);

            this.Property(t => t.DiseaseName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_UserAndDisease");
            this.Property(t => t.UserAndDiseaseID).HasColumnName("UserAndDiseaseID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.UserNikeName).HasColumnName("UserNikeName");
            this.Property(t => t.DiseaseID).HasColumnName("DiseaseID");
            this.Property(t => t.DiseaseName).HasColumnName("DiseaseName");
        }
    }
}
